package com.easy.service.impl;

import com.easy.bean.Member;
import com.easy.dao.IMemberDao;
import com.easy.service.IMemberService;
import com.easy.utils.Page;
import com.easy.utils.Type;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;

@Service
public class MemberServiceImpl implements IMemberService {

    @Autowired
    IMemberDao dao;

    @Override
    public List<Member> getMember(Member member, Page page) {
        return dao.getMember(member, page);
    }

    @Override
    public int getMemberCount(Member member) {
        return dao.getMemberCount(member);
    }

    @Override
    public List<Member> getAllMember() {
        return dao.getAllMember();
    }

    @Override
    public int delMemberByID(int id) {
        return dao.delMemberByID(id);
    }

    @Override
    public int addMember(Member member) {
        return dao.addMember(member);
    }

    @Override
    public Member getMemberByID(int id) {
        return dao.getMemberByID(id);
    }

    @Override
    public int editMember(Member member) {
        return dao.editMember(member);
    }

    @Override
    public List<Type> getMemberType() {
        return dao.getMemberType();
    }

    @Override
    public List<Type> getMemberStatusType() {
        return dao.getMemberStatusType();
    }
}
